﻿using UnityEngine.Rendering.Universal;

namespace Learning
{
    public class MiscRenderPassFeature : ScriptableRendererFeature
    {
        public MiscSetting setting = new MiscSetting();

        private MiscRenderPass1 _pass1;
        private MiscRenderPass2 _pass2;

        public override void Create()
        {
            _pass1 = new MiscRenderPass1();
            _pass1.renderPassEvent = setting.passEvent_1;
            _pass1.setting = setting;

            _pass2 = new MiscRenderPass2();
            _pass2.renderPassEvent = setting.passEvent_2;
            _pass2.setting = setting;
        }

        public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
        {
            renderer.EnqueuePass(_pass1);
            renderer.EnqueuePass(_pass2);
        }
    }
}
